/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.swta;

import org.apache.wicket.model.LoadableDetachableModel;

/**
 *
 * @author JKorreck
 */
public class DetacheableItemsModel extends LoadableDetachableModel {

    String id;

    public DetacheableItemsModel(MyItem item) {
        this(item.getId());
    }

    public DetacheableItemsModel(String id) {
        this.id = id;
    }

    @Override
    protected Object load() {
        return MyItemManager.getInstance().getItem(id);
    }

}
